package org.example.homepage.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.experimental.Accessors;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Test")
@Accessors(chain = true)
@Tag(name="测试类",description = "用于测试的控制类")
public class TestController {

    @GetMapping("/error")
    @Operation(summary = "用于测试异常的类")
    public void ErrorTest() {
        throw new RuntimeException("General exception occurred");
    }
}
